package wli.app.util;

import java.io.File;

public class DirectoryExample {
	public static void main(String... args) {
		File[] files = new File("C:/Apache/htdocs/DailyLogs").listFiles();
		showFiles(files);
	}

	public static void showFiles(File[] files) {
		for (File file : files) {
			if (file.isDirectory()) {
				System.out.println("Directory: " + file.getName()+" Path="+file.getPath());
				showFiles(file.listFiles()); // Calls same method again.
			} else {
				//System.out.println("File: " + file.getName());
			}
		}
	}

}
